﻿using IdeaBlade.Application.Framework.Core.DesignTimeSupport;
using IdeaBlade.Application.Framework.Core.Persistence;
using IdeaBlade.Core.Composition;

namespace CoProjectModel
{
    /// <summary>
    /// Concrete EntityManagerProvider used during development. Uses a fake datastore.
    /// </summary>
    public class DevelopmentEntityManagerProvider : BaseFakeStoreEntityManagerProvider<CoProjectEntities>
    {
        public DevelopmentEntityManagerProvider(params ISampleDataProvider<CoProjectEntities>[] sampleDataProviders)
            //: base(sampleDataProviders: sampleDataProviders)
            : base(null, null, sampleDataProviders: sampleDataProviders)
        {
        }

        protected override CoProjectEntities CreateEntityManager()
        {
            // Return an EntityManager with a fake backing store
            return new CoProjectEntities(compositionContextName: CompositionContext.Fake.Name);
        }
    }
}